package com.white.commonlib.manager;

import android.content.Context;

import com.white.commonlib.manager.net.HttpManager;

import java.lang.ref.WeakReference;
import java.util.Stack;

/**
 * Created by yutf on 2017/9/19 0019.
 */

final class UploadLogManager
{
    private Stack<RemoteLogPrintTask> stack;
    private HttpManager manager;
    private WeakReference<Context> wContext;

    public static UploadLogManager instance;

    private UploadLogManager(Context c)
    {
        manager = HttpManager.getInstance();
        stack = new Stack<>();
        wContext = new WeakReference<Context>(c);
    }

    public static UploadLogManager getInstance(Context ctx)
    {
        if(instance == null)
        {
            synchronized(UploadLogManager.class)
            {
                if(instance == null)
                {
                    instance = new UploadLogManager(ctx);
                }
            }
        }
        return instance;
    }

    public void pull(String msg)
    {
        RemoteLogPrintTask t = new RemoteLogPrintTask(wContext.get(), msg);
    }
}
